package com.atguigu.yygh.enums;

import org.apache.xmlbeans.impl.xb.xsdschema.impl.PublicImpl;

/**
 * ClassName: StatusEnum
 * Package: com.atguigu.yygh.enums
 * Description:
 *
 * @Author: cqk
 * @Create: 2023/9/27 - 12:48
 * @Version: v1.0
 */
public enum StatusEnum {

    LOCK(0,"锁定"),
    NORMAL(1,"正常")
    ;
    private Integer status;
    private String statusString;

    public static String getStatusStringByStatus(Integer status){
        StatusEnum[] values = StatusEnum.values();
        for (StatusEnum value : values) {
            if(value.getStatus().intValue() == status.intValue()){
                return value.getStatusString();
            }
        }
        return "";
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getStatusString() {
        return statusString;
    }

    public void setStatusString(String statusString) {
        this.statusString = statusString;
    }

    StatusEnum(Integer status, String statusString) {
        this.status = status;
        this.statusString = statusString;
    }
}
